package com.ruoyi.wms.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wms.mapper.WmsInventoryMapper;
import com.ruoyi.wms.domain.WmsInventory;
import com.ruoyi.wms.service.IWmsInventoryService;

/**
 * 库存Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-21
 */
@Service
public class WmsInventoryServiceImpl implements IWmsInventoryService 
{
    @Autowired
    private WmsInventoryMapper wmsInventoryMapper;

    /**
     * 查询库存
     * 
     * @param inventoryUuid 库存主键
     * @return 库存
     */
    @Override
    public WmsInventory selectWmsInventoryByInventoryUuid(String inventoryUuid)
    {
        return wmsInventoryMapper.selectWmsInventoryByInventoryUuid(inventoryUuid);
    }

    /**
     * 查询库存列表
     * 
     * @param wmsInventory 库存
     * @return 库存
     */
    @Override
    public List<WmsInventory> selectWmsInventoryList(WmsInventory wmsInventory)
    {
        return wmsInventoryMapper.selectWmsInventoryList(wmsInventory);
    }

    /**
     * 新增库存
     * 
     * @param wmsInventory 库存
     * @return 结果
     */
    @Override
    public int insertWmsInventory(WmsInventory wmsInventory)
    {
        return wmsInventoryMapper.insertWmsInventory(wmsInventory);
    }

    /**
     * 修改库存
     * 
     * @param wmsInventory 库存
     * @return 结果
     */
    @Override
    public int updateWmsInventory(WmsInventory wmsInventory)
    {
        return wmsInventoryMapper.updateWmsInventory(wmsInventory);
    }

    /**
     * 批量删除库存
     * 
     * @param inventoryUuids 需要删除的库存主键
     * @return 结果
     */
    @Override
    public int deleteWmsInventoryByInventoryUuids(String[] inventoryUuids)
    {
        return wmsInventoryMapper.deleteWmsInventoryByInventoryUuids(inventoryUuids);
    }

    /**
     * 删除库存信息
     * 
     * @param inventoryUuid 库存主键
     * @return 结果
     */
    @Override
    public int deleteWmsInventoryByInventoryUuid(String inventoryUuid)
    {
        return wmsInventoryMapper.deleteWmsInventoryByInventoryUuid(inventoryUuid);
    }
}
